<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title> 4-4 多种选择（Switch语句)</title>
    <link rel="stylesheet" type="text/css" href="../../../css/style.css"/>
    <style type="text/css">
    </style>

    <script type="text/javascript">
/*        var myweek = 3;//myweek表示星期几变量
        switch (myweek) {
            case 1:
            case 2:
                document.write("学习理念知识");
            break;
            case 3:
            case 4:
                document.write("到企业实践");
            break;
            case 5:
                document.write("总结经验");
            break;
            case 6:
            case 7:
                document.write("周六、日休息和娱乐");
                break;
            default:
                document.write("出现错误了哦!")
        }
*/


        function b(){
            var myweek=document.getElementById("a").value;  //myeek表示星期几变量
            if(myweek==1||myweek==2){
                alert("学习理念知识");
            }
            else if(myweek==3||myweek==4){
                alert("到企业实践");
            }
            else if(myweek==5){
                alert("工作总结");
            }
            else if(myweek==6||myweek==7){
                alert("周六,周日休息和娱乐");
            }
            else{
                alert("放假");
            }
        }



    </script>
</head>

<body>
<div align="center">
    <p><a href="../../index.php#jsjjp" class="fontSize" title="点击进入该目录">目录</a></p>
</div>

<div>请输入工作日:</div>
<input type="text" id="a" value="请输入1-7数字查询" name="a" onclick="select();" >
<input type="button" value="查看工作安排" onclick="b()">

<script type="text/javascript">

</script>

</body>
</html>
